<?php
	namespace View;
	
	class PortfolioGalleryView{
		private $m_viewpic= "viewpic";
		
		public function DoGallery($posts){
			$html ="<div class='contentBlock transition'>";
			foreach ($posts as $p) {
				$html .= "	<a href='?".NavigationView::NAVLOCATION."=".NavigationView::PORTFOLIO."&$this->m_viewpic=".$p->postId()."' class='portfolioThumb'><img class='thumbimg' src='".$p->postPicture()."' alt='".$p->postTitle()."' /></a>
							";
			}
			$html .="</div>";
			return $html;
		}
		
		public function ViewPicture(){
			if(isset($_GET[$this->m_viewpic])){
				return true;
			}
			return false;
		}
		
		public function DoViewPicture($obj){
			$picId = $_GET[$this->m_viewpic];
			
			return "<div style='z-index:1000' class='contentBlock'><img src='".$obj->postPicture()."' /></div>";
			
		}
		
		public function getPictureId(){
			return $_GET[$this->m_viewpic];
		}
	}
?>